// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.SQLUtils;
// import com.alibaba.druid.sql.ast.*;
// import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr*;
// import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExprGroup*;
// import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator;
// import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor*;

// import java.util.ArrayList;
// import java.util.std::list;
#pragma once
#include <string>
#include <list>

#include "../SQLStatementImpl.h"
#include "../SQLReplaceable.h"
#include "../../../utils/common_ptr.h"

class SQLTableSource;
class SQLExpr;
class SQLWithSubqueryClause;
class DbType;
class SQLExprTableSource;
class SQLName;
class SQLObject;

class SQLDeleteStatement : public SQLStatementImpl, public SQLReplaceable
{
public:
  SQLWithSubqueryClause_ptr with;

  SQLTableSource_ptr tableSource;
  SQLExpr_ptr where;
  SQLTableSource_ptr from;
  SQLTableSource_ptr using_;

  BOOL_ptr only;

  SQLDeleteStatement();

  SQLDeleteStatement(DbType_ptr dbType);
  SHAREDOBJECT(SQLDeleteStatement);

  void cloneTo(SQLDeleteStatement_ptr x);

  // SQLDeleteStatement* clone() ;
  virtual SQLObject_ptr clone();
  SQLTableSource_ptr getTableSource();

  SQLExprTableSource_ptr getExprTableSource();

  void setTableSource(SQLExpr_ptr expr);

  void setTableSource(SQLTableSource_ptr tableSource);

  SQLName_ptr getTableName();

  void setTableName(SQLName_ptr tableName);

  void setTableName(string_ptr name);

  SQLExpr_ptr getWhere();

  void setWhere(SQLExpr_ptr where);

  string_ptr getAlias();

  void setAlias(string_ptr alias);

  void accept0(SQLASTVisitor_ptr visitor);

  SQLObject_list_ptr getChildren();

  SQLTableSource_ptr getFrom();

  void setFrom(SQLTableSource_ptr from);

  BOOL_ptr replace(SQLExpr_ptr expr, SQLExpr_ptr target);

  BOOL_ptr isOnly();

  void setOnly(BOOL_ptr only);

  SQLTableSource_ptr getUsing();

  void setUsing(SQLTableSource_ptr using_);

  SQLWithSubqueryClause_ptr getWith();

  void setWith(SQLWithSubqueryClause_ptr with);

  void addCondition(string_ptr conditionSql);

  void addCondition(SQLExpr_ptr expr);

  BOOL_ptr removeCondition(string_ptr conditionSql);

  BOOL_ptr removeCondition(SQLExpr_ptr condition);

  BOOL_ptr addWhere(SQLExpr_ptr where);
};
